$(function () {
    $(".newLeft").load("./newLeft.html", function () {
        console.log("执行完毕");
    })
    $(".footer").load("./footer.html",function () {
        console.log("1");
    })
    $(".newRight").load("./newRight.html",function () {
        console.log("1");
    })
    $.ajax({
        url:"http://10.41.155.29:8080/mecoxlanenet/server/goodInfo.php",
        dataType:"json"
    }).done(function (res) {
        console.log(res);
        res.forEach((el,index)=>{
            const strHtml=`
                <li><a href="./goodsInfo.html?id=${el.gId}"><img src="${el.tImg.split(",")[0]}" alt=""></a>
            <h2><a href="./goodsInfo.html?id=${el.gId}">${el.gName}</a></h2>
            <p class="price">&yen;${el.gPrice}</p>
        </li>
                   `;
        $(".goods ul").append(strHtml);
    })
    })
})
